import request from '@/utils/request'

export default{

// TODO ----------------->课程列表 
getCourseBasicInfo(pageParam){
  return request({
    url: '/eduservice/course/getBasiceCourseBasicInfoList',
    method: 'post',
    data: pageParam
  })
}, 

//删除课程
deleteCourse(courseId){
  return request({
    url: `/eduservice/course/deleteCourse/${courseId}`,
    method: 'post'
  })
},


  // ---------------->步骤条
  //添加课程
  addCourse(courseParam) {
    return request({
      url: '/eduservice/course/addCourse',
      method: 'post',
      data:courseParam
    })
  },


  //查询所有老师
  getTeacherList(){
    return request({
      url: '/eduservice/teacher/findAll',
      method: 'get'
    })
  },


    //查询所有分类列表
    getSubjectList() {
      return request({
        url: '/eduservice/subject/getSubjectList',
        method: 'get'
      })
    },

    //根据id回显数据
    getCourseInfo(courseId){
      return request({
        url: `/eduservice/course/getCourseInfo/${courseId}`,
        method: 'get'
      }) 
    },

    //修改课程
    updateCourseInfo(courseParam){
      return request({
        url: `/eduservice/course/updateCourseInfo`,
        method: 'post',
        data:courseParam
      }) 
    },

    //获取最终显示的数据
    getPublishCourseInfo(courseId){
      return request({
        url: `/eduservice/course/getPublishCourseInfo/${courseId}`,
        method: 'get',
      }) 
    },

    //最终发布
    publishCourse(courseId){
      return request({
        url: `/eduservice/course/publishCourse/${courseId}`,
        method: 'post',
      })
    },



} 
